package com.meizu;


import javax.jms.Queue;

import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.annotation.EnableJms;

@Configuration
@EnableJms
public class JmsConfig {
	//队列模式
	@Bean  
    public Queue logQueue() {  
        return new ActiveMQQueue("TestQueue");  
    } 
	
	/**
	 * 主题模式
	 * @return
	 */
	@Bean
	public ActiveMQTopic topic() {
		return new ActiveMQTopic("TestTopic");
		
	}
}
